package StudyCode.summary.Basic.myarray;

import java.util.Arrays;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class FillArray {

	public static void main(String[] args) {
		int[] data = new int[10];
		System.out.println("整个数组填充前:");
		System.out.println(Arrays.toString(data));
		Arrays.fill(data, 6);
		System.out.println("整个数组填充后");
		System.out.println(Arrays.toString(data));

		int[] data1 = new int[10];
		System.out.println("数组指定范围填充前:");
		System.out.println(Arrays.toString(data1));
		Arrays.fill(data1,2,8,8);
		System.out.println("数组指定范围填充后");
		System.out.println(Arrays.toString(data1));
	}

}
